import { loadPromptFromTemplate, generatePrompt } from '../loader.js';

interface GradualTrySolutionParams {
  solutionCandidates: string;
  implementationStrategy?: string;
  riskTolerance?: string;
  validationCriteria?: string[];
  iterationLimit?: number;
  memoryDir?: string;
}

export async function getGradualTrySolutionPrompt(params: GradualTrySolutionParams): Promise<string> {
  const template = await loadPromptFromTemplate('gradualTrySolution/index.md');
  
  return generatePrompt(template, {
    solutionCandidates: params.solutionCandidates,
    implementationStrategy: params.implementationStrategy || 'incremental',
    riskTolerance: params.riskTolerance || 'moderate',
    validationCriteria: params.validationCriteria?.join(', ') || 'functionality, performance, reliability',
    iterationLimit: params.iterationLimit || 3,
    memoryDir: params.memoryDir || ''
  });
}
